
import rqdatac as rq

rq.init("13570866213", "39314656")

df = rq.get_price('SP i2201&i2205'.upper(),start_date="2021-09-07", end_date="2021-09-10", frequency='15m',expect_df=True)
#df.to_csv("D:\learn_and_test_data\\convertible_113008_XSHG_1d.csv")
print(len(df))
print(df.head(10))

#all_convertible = rq.convertible.all_instruments("20161009")
#print(all_convertible.head(10))
#all_convertible.to_csv("D:\learn_and_test_data\\all_convertible_2016.csv")
"""
con = rq.convertible.instruments("128054.XSHE")
print(con.conversion_start_date)
print(con.conversion_end_date)
print(con)
"""